package com.yifeng.repo.toolkit.elasticsearch.configure;

import com.yifeng.repo.base.constant.DeployModeEnum;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * Created by daibing on 2021/5/17.
 */
@Data
@ConfigurationProperties(prefix = "yfcloud.toolkit.elasticsearch")
public class ElasticsearchProperties {
    private DeployModeEnum deployMode = DeployModeEnum.STANDALONE;
    private String hostname = "localhost";
    private int port = 9200;
    private String clusterHostAndPorts = "192.168.230.95:9200,192.168.230.96:9201";
    private String scheme = "http";
    private String userName;
    private String password;
    private int connectTimeout = 1000;
    private int socketTimeout = 30 * 1000;
    private int connectionRequestTimeout = 500;
    private int keepAliveTimeout = 5 * 60 * 1000;
    private int maxConnTotal = 30;
    private int maxConnPerRoute = 10;
    private Boolean requestCache;

    private String aliasName;

    private List<ElasticsearchProperties> clusters;
}
